package day05;
public class InsertSort {
	public static  void main(String args[]){
		int[] a={2, 7, 6, 1, 3, 9, 8, 4, 5,0 };
		int i, j, temp;
		for( i=0; i<a.length; i++){		    
			for( j=i-1; j>=0 && a[j]>a[i]; j--){
				temp=a[j+1];
				a[j+1]=a[j];
				a[j+1]=temp;				
				System.out.print(a[i]+" ");
			}
			
		}
	}
}
